home *** CD-ROM | disk | FTP | other *** search
- #
- # Zustands-▄berwachungs-Script
- # State Watch Script
- #
- # TownCenter
- #
- # created: 15-Jun-2000 Bernd
- #
- # (C) COPYRIGHT 2000 RADONLABS GMBH
- #
-
- proc towncenterwatch_normal {} {
-
- # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
- # (in BackPack) oder gebaut (kein Artefakt mehr) wird
-
- if {[.getartefactmode] == "false"} {
- .announcestate house
- } elseif {[.iscollected] == "true"} {
- .announcestate backpack
- } elseif {[.getcreator] != "null"} {
- .announcestate infactoryslot
- }
- }
-
- proc towncenterwatch_infactoryslot {} {
-
- # vorerst hier unzerstoerbar. Bleibt so, bis es aufgesammelt
- # (in BackPack) oder gebaut (kein Artefakt mehr) wird
- if {[.getartefactmode] == "false"} {
- .announcestate house
- } elseif {[.iscollected] == "true"} {
- .announcestate backpack
- } elseif {[.getcreator] == "null"} {
- .announcestate normal
- }
- }
-
- proc towncenterwatch_bauphase {} {
-
- # kann zerstoert oder wieder zusammengeklappt werden
- if {[.iskilled] == "true"} {
- .announcestate explode
- } elseif {[.getartefactmode] == "true"} {
- .announcestate normal
- } elseif {[.isstatetimeover] == "true"} {
- .announcestate house
- usersymbolicname playerlighthouse
- }
- }
-
-
- proc towncenterwatch_house {} {
- /game/handler/feedback.registerenergylow [psel]
- # kann zerstoert oder wieder zusammengeklappt werden
- if {[.iskilled] == "true"} {
- .announcestate explode
- } elseif {[.getartefactmode] == "true"} {
- .announcestate normal
- } elseif {[.isdooropen] == "true"} {
- .announcestate open
- } elseif {[.removebuilding] == "true"} {
- .announcestate remove
- }
- }
-
- proc towncenterwatch_explode {} {
-
- # Uebergang zum Artefakt oder Wegnehmen
- if {[.isanimfinished] == "true"} {
- if {[.getcharges] <= 0} {
- .setremoveable true
- } else {
- .announcestate normal
- .removefromisland
- }
- }
- }
-
- proc towncenterwatch_remove {} {
-
- # Uebergang zum Artefakt oder Wegnehmen
- if {[.isanimfinished] == "true"} {
- if {[.getcharges] <= 0} {
- .setremoveable true
- } else {
- .announcestate normal
- .removefromisland
- }
- }
- }
-
- proc towncenterwatch_backpack {} {
-
- # Moeglich: usgeworfen (Nicht mehr "gesammelt") oder im
- # Menue gezeigt (sichtbar)
- if {[.iscollected] == "false"} {
- .announcestate normal
- } elseif {[.isvisible] == "true"} {
- .announcestate menue
- }
- }
-
- proc towncenterwatch_menu {} {
-
- if {[.isvisible] == "false"} {
- .announcestate backpack
- } elseif {[.getartefactuse] == "true"} {
- .announcestate build
- } elseif {[.iscollected] == "false"} {
- .announcestate normal
- }
- }
-
- proc towncenterwatch_build {} {
-
- if {[.iskilled] == "true"} {
- .announcestate explode
- } elseif {[.getartefactmode] == "false"} {
- .announcestate bauphase
- } elseif {[.getartefactuse] == "false"} {
- .announcestate backpack
- }
- }
-
- proc towncenterwatch_cinematic {} {
-
- # empty
- }
-
- #-------------------------------------------------------------------------------
- # Bewegt Insel in meinen Clan. Wird aufgerufen vom gebauten TownCenter
- #-------------------------------------------------------------------------------
- proc moveislandintomyclan {} {
-
- set the_island [.getparentvehicle]
- if {$the_island == "null"} {
- puts "Aua! TownCenter hat kein Parentvehicle!"
- } else {
- set clan [$the_island.getclan]
- set my_clan [.getclan]
- set my_clanid [$my_clan.getname]
-
- # store the island. Name of the island will be changed!
- # It is much simplier, to store the name BEFORE we move it!
- $clan.unsetplayerisland
- $my_clan.setplayerisland $the_island
-
- $clan.moveobjecttoclan $the_island $my_clanid
- }
- }
-
-
-